// import { ResPage, User } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

//加载全部的科室
export const GetKeShiXinXiSel = () => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetKeShiXinXiSel");
};

//查询费用类别 组合项目里边的
export const GetFeiYongLeiBieSel = () => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetFeiYongLeiBieSel");
};

//检验性质查询  申请单里边的
export const GetJianYanXingZhiSel = () => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetJianYanXingZhiSel");
};

//根据组合项目id查询明细项目
export const GetMingXiXiangMuSel = params => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetMingXiXiangMuSel", params);
};

//根据科室id所属院区查询申请单
export const GetShenQingDanSel = params => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetShenQingDanSel", params);
};

//根据申请单id所属报告分类查询组合项目
export const GetZuHeXiangMuSel = params => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetZuHeXiangMuSel", params);
};

//组合项目维护明细项目添加
export const PostMingXiXiangMuAdd = params => {
  return http.post<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/PostMingXiXiangMuAdd", params);
};

//组合项目   明细项目删除
export const DeleteMingXiXiangMuDel = params => {
  return http.delete("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/DeleteMingXiXiangMuDel" + "?strMingXiXiangMuID=" + params);
};

//组合项目   明细项目修改
export const PutMingXiXiangMuUpdate = params => {
  return http.put<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/PutMingXiXiangMuUpdate", params);
};

//申请单添加
export const PostShenQingDanAdd = params => {
  return http.post<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/PostShenQingDanAdd", params);
};

//申请单删除
export const PostShenQingDanDel = params => {
  return http.delete("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/DeleteShenQingDanDel" + "?strShenQingDanID=" + params);
};

//申请单修改
export const PutShenSingDanUpdate = params => {
  return http.put<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/PutShenSingDanUpdate", params);
};

//组合项目添加
export const PostZuHeXiangMuAdd = params => {
  return http.post<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/PostZuHeXiangMuAdd", params);
};

//组合项目删除
export const DeleteZuHeXiangMuDel = params => {
  return http.delete("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/DeleteZuHeXiangMuDel" + "?strZuHeXiangMuID=" + params);
};

//组合项目修改
export const PutZuHeXiangMuUpdate = params => {
  return http.put<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/PutZuHeXiangMuUpdate", params);
};

//调整申请单
export const PutTiaoZhengZuHeXiangMu = (strXinShenQingDanID, strZuHeXiangMuID, strXinKeShiID) => {
  return http.put<any>(
    "/api/ZuHeXiangMuWeiHu/" +
      PORT1 +
      "/PutTiaoZhengZuHeXiangMu" +
      "?strXinShenQingDanID=" +
      strXinShenQingDanID +
      "&strZuHeXiangMuID=" +
      strZuHeXiangMuID +
      "&strXinKeShiID=" +
      strXinKeShiID
  );
};

//组合项目检索值查询
export const GetJianSuoZuHeXiangMuSel = params => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetJianSuoZuHeXiangMuSel?strKeShiID=" + params);
};

// 申请单调整循序
export const PutShenQingDanTiaoZhengShunXu = (iQianShunXu, iHouShunXu, ShenQingDanID) => {
  return http.put<any>(
    "/api/ZuHeXiangMuWeiHu/" +
      PORT1 +
      "/PutShenQingDanTiaoZhengShunXu" +
      "?iQianShunXu=" +
      iQianShunXu +
      "&iHouShunXu=" +
      iHouShunXu +
      "&ShenQingDanID=" +
      ShenQingDanID
  );
};

// 组合项目调整循序
export const PutZuHeXiangMuTiaoZhengShunXu = (iQianShunXu, iHouShunXu, ZuHeXiangMuID) => {
  return http.put<any>(
    "/api/ZuHeXiangMuWeiHu/" +
      PORT1 +
      "/PutZuHeXiangMuTiaoZhengShunXu" +
      "?iQianShunXu=" +
      iQianShunXu +
      "&iHouShunXu=" +
      iHouShunXu +
      "&ZuHeXiangMuID=" +
      ZuHeXiangMuID
  );
};

//明细项目调整循序
export const PutMingXiXiangMuTiaoZhengShunXu = (iQianShunXu, iHouShunXu, MingXiXiangMuID) => {
  return http.put<any>(
    "/api/ZuHeXiangMuWeiHu/" +
      PORT1 +
      "/PutMingXiXiangMuTiaoZhengShunXu" +
      "?iQianShunXu=" +
      iQianShunXu +
      "&iHouShunXu=" +
      iHouShunXu +
      "&MingXiXiangMuID=" +
      MingXiXiangMuID
  );
};

//通用_查询科室申请单
export const GetKeShiShenQingDanSel = () => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetKeShiShenQingDanSel");
};

//通用_根据申请单ID查询组合项目
export const GetZuHeXiangMuTongYongSel = id => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetZuHeXiangMuTongYongSel?strShenQingDanID=" + id);
};

//包含组合项目查询
export const GetBaoHanZuHeXiangMuSel = params => {
  return http.get<any>("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/GetBaoHanZuHeXiangMuSel", params);
};

//包含组合项目添加
export const PostBaoHanZuHeXiangMuAdd = (strZuHeXiangMuID, strBaoHanZuHeXiangMuID) => {
  return http.post<any>(
    "/api/ZuHeXiangMuWeiHu/" +
      PORT1 +
      "/PostBaoHanZuHeXiangMuAdd?strZuHeXiangMuID=" +
      strZuHeXiangMuID +
      "&strBaoHanZuHeXiangMuID=" +
      strBaoHanZuHeXiangMuID
  );
};

//包含组合项目删除
export const DeleteBaoHanZuHeXiangMuDel = strBaoHanGuanXiID => {
  return http.delete("/api/ZuHeXiangMuWeiHu/" + PORT1 + "/DeleteBaoHanZuHeXiangMuDel?strBaoHanGuanXiID=" + strBaoHanGuanXiID);
};
